package GUI;

import java.awt.Color;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JComboBox;

/**
 * The Class MakeOfferGUI.
 * Boundary for making an offer to the customer activity.
 */
public class MakeOfferGUI extends AbstractPanelGUI {

	/** The button back. */
	private JButton btnBack;
	
	/** The offer combo box. */
	private JComboBox offerCB;
	
	/** The button offer. */
	private JButton btnOffer;
	
	/**
	 * Instantiates a new make offer gui.
	 */
	public MakeOfferGUI() {
		
		setBackground(Color.RED);
		initialize();

	}
	
	/* (non-Javadoc)
	 * @see GUI.AbstractPanelGUI#initialize()
	 */
	@Override
	public void initialize() {
		setLayout(null);
		setSize(Width,Height);
		
		btnBack = new JButton("Back");
		btnBack.setBounds(107, 304, 89, 23);
		add(btnBack);
		
		offerCB = new JComboBox();
		offerCB.setBounds(81, 86, 338, 29);
		add(offerCB);
		
		btnOffer = new JButton("Make Offer");
		btnOffer.setBounds(300, 304, 136, 23);
		add(btnOffer);
		
		
	}
	
	/**
	 * Gets the offer combo box.
	 *
	 * @return the offer combo box
	 */
	public JComboBox getOfferCB() {
		return offerCB;
	}

	/**
	 * Adds action listener to make offer button.
	 *
	 * @param listener the listener
	 */
	public void addMakeOfferActionListener(ActionListener listener)
	{
		btnOffer.addActionListener(listener);
	}
	

	/**
	 * Adds action listener to make offer button.
	 *
	 * @param listener the listener
	 */
	public void addBackActionListener(ActionListener listener)
	{
		btnBack.addActionListener(listener);
	}
}
